{include file="header.html"}
<script type="text/javascript">
//<!CDATA[
$(function(){
    $('#keyword_form').validate({
        errorPlacement: function(error, element){
            $(element).next('.field_notice').hide();
            $(element).after(error);
        },
        success       : function(label){
            label.addClass('right').text('OK!');
        },
        rules : {
            keyword : {
                required : true,
                byteRange: ['',100,'{$charset}']
            },
            url  : {
                url      : true
            },
            sort : {
                number   : true
            }
        },
        messages : {
            keyword : {
                required : '热门关注词不能为空',
                byteRange: '热门关注词在100字以内'
            },
            url  : {
                url      : '链接不正确'
            },
            sort  : {
                number   : '排序只能是数字'
            }
        }
    });
});
//]]>
</script>
<div id="rightTop">
    <p>分类关键字</p>
    <ul class="subnav">
        <li><a class="btn1" href="index.php?app=o2okeyword">{$lang.manage}</a></li>
        {if $scatekeyword.keyword_id}
        <li><a class="btn1" href="index.php?app=o2okeyword&amp;act=add">{$lang.add}</a></li>
        {else}
        <li><span>{$lang.add}</span></li>
        {/if}
    </ul>
</div>

<div class="info">
    <form method="post" enctype="multipart/form-data" id="keyword_form">
        <table class="infoTable">
            <!--{foreach from=$languages item=language}-->
            <!--{assign var="langid" value="$language.lang_id"}-->
            <tr>
                <th class="paddingT15">
                    {$language.name}分类关键字:</th>
                <td class="paddingT15 wordSpacing5">
                    <input class="infoTableInput2" id="keyword_{$langid}" type="text" name="keyword[{$language.lang_id}]" value="{$scatekeyword.keyword.$langid|escape}" /> 
                </td>
            </tr>
            <!--{/foreach}-->
            <tr>
                <th class="paddingT15">
                    推荐分类:</th>
                <td class="paddingT15 wordSpacing5"> 
					<select name="recom_id">
					{html_options options=$recom_list selected=$scatekeyword.recom_id}
					</select>
                </td>
            </tr>           
            <tr>
                <th class="paddingT15">
                    {$lang.sort_order}:</th>
                <td class="paddingT15 wordSpacing5">
                    <input class="sort_order" id="sort" type="text" name="sort" value="{if $scatekeyword.sort}{$scatekeyword.sort}{else}255{/if}" />
                </td>
            </tr>
            <tr>
                <th class="paddingT15">
                    关键字URL:</th>
                <td class="paddingT15 wordSpacing5">
                    <input class="infoTableFile2" type="text" name="url" value="{$scatekeyword.url}" />
                </td>
            </tr>
            <tr>
                <th class="paddingT15">
                    分类logo:</th>
                <td class="paddingT15 wordSpacing5">
                    <input class="infoTableFile2" type="file" name="logo"/>
                    <label class="field_notice">分类标示图</label>              </td>
            </tr>
            <!--{if $scatekeyword.logo}-->
            <tr>
                <th class="paddingT15"></th>
                <td class="paddingT15 wordSpacing5">
                <a href="{$site_url}/{$scatekeyword.logo}" target="_blank"><img src="{$site_url}/{$scatekeyword.logo}" class="makesmall" max_width="120" max_height="90" /></a>
                </td>
            </tr>
            <!--{/if}-->
        <tr>
            <th></th>
            <td class="ptb20">
                <input class="formbtn" type="submit" name="Submit" value="{$lang.submit}" />
                <input class="formbtn" type="reset" name="Submit2" value="{$lang.reset}" />
            </td>
        </tr>
        </table>
    </form>
</div>
{include file="footer.html"}
